class LuckInfoModel{
  String jackpot;
  NewPrize newPrize;
  NewPrize lastPrize;
  List<WinningList> winningList;
  bool is_JoinWinning;
  String currentNumber;
  List<String> prizeRule;
  List<WinnerCount> winningCount;
  LuckInfoModel({this.jackpot,this.newPrize,this.lastPrize,this.winningList,this.is_JoinWinning,this.currentNumber,this.prizeRule,this.winningCount});
  LuckInfoModel.fromJson(Map<String, dynamic> json) {
    jackpot = json['jackpot'];
    newPrize = json['newPrize'] != null ? NewPrize.fromJson(json['newPrize']) : null;
    lastPrize = json['lastPrize'] != null ? NewPrize.fromJson(json['lastPrize']) : null;
    if (json['winningList'] != null) {
      winningList = [];
      json['winningList'].forEach((v) {
        winningList.add(WinningList.fromJson(v));
      });
    }else{
      winningList = [];
    }
    is_JoinWinning = json['is_JoinWinning'];
    currentNumber = json['currentNumber'];
    prizeRule = json['prizeRule'] != null ? json['prizeRule'].cast<String>() : [];
    if (json['winningCount'] != null) {
      winningCount = [];
      json['winningCount'].forEach((v) {
        winningCount.add(WinnerCount.fromJson(v));
      });
    }else{
      winningCount = [];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['jackpot'] = this.jackpot;
    if (this.newPrize != null) {
      data['newPrize'] = this.newPrize.toJson();
    }
    if (this.lastPrize != null) {
      data['lastPrize'] = this.lastPrize.toJson();
    }
    if (this.winningList != null) {
      data['winningList'] = this.winningList.map((v) => v.toJson()).toList();
    }else{
      data['winningList'] = this.winningList;
    }
    data['is_JoinWinning'] = this.is_JoinWinning;
    data['currentNumber'] = this.currentNumber;
    data['prizeRule'] = this.prizeRule;
    if (this.winningCount != null) {
      data['winningCount'] = this.winningCount.map((v) => v.toJson()).toList();
    }else{
      data['winningCount'] = this.winningCount;
    }
    return data;
  }
}

class WinnerCount{
  dynamic count;
  dynamic winning;
  dynamic level;
  dynamic sn;
  dynamic number;
  WinnerCount({this.count,this.winning,this.level,this.sn,this.number});
  WinnerCount.fromJson(Map<String, dynamic> json) {
    count = json['count'];
    winning = json['winning'];
    level = json['level'];
    sn = json['sn'];
    number = json['number'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['count'] = this.count;
    data['winning'] = this.winning;
    data['level'] = this.level;
    data['sn'] = this.sn;
    data['number'] = this.number;
    return data;
  }
}


class NewPrize{
  String id;
  String sn;
  String state;
  String time;
  String end_time;
  String buy_num;
  String winning_num;
  String total;
  String av;
  String number;
  NewPrize({this.id,this.sn,this.state,this.time,this.end_time,this.buy_num,this.winning_num,this.total,this.av,this.number});
  NewPrize.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    sn = json['sn'];
    state = json['state'];
    time = json['time'];
    end_time = json['end_time'];
    buy_num = json['buy_num'];
    winning_num = json['winning_num'];
    total = json['total'];
    av = json['av'];
    number = json['number'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['sn'] = this.sn;
    data['state'] = this.state;
    data['time'] = this.time;
    data['end_time'] = this.end_time;
    data['buy_num'] = this.buy_num;
    data['winning_num'] = this.winning_num;
    data['total'] = this.total;
    data['av'] = this.av;
    data['number'] = this.number;
    return data;
  }
}

class WinningList{
  String username;
  WinningList({this.username});
  WinningList.fromJson(Map<String, dynamic> json) {
    username = json['username'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['username'] = this.username;
    return data;
  }
}